package synchronized_12_21;

public class Demo2_synchronized {
    public synchronized void fun1(){

    }
    public synchronized void fun2(){

    }
    public void fun3(){
        synchronized (this){

        }
    }
    //静态方法不属于任一个实例
    //修饰静态方法时，
    public static void fun4(){

    }
}
